package edu.zut.cs.software.person.supplier.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import edu.zut.cs.software.teach.Base.domain.BaseTreeEntity;


/**
 * 
 * @author Jianghe.
 *
 */
@Entity
@Table(name = "T_SupplierCategory")
@NamedQueries({ @NamedQuery(name = "SupplierCategory.getRoot", query = "select m from SupplierCategory m where m.parent is null") })
public class SupplierCategory extends BaseTreeEntity<SupplierCategory,Long> {
	private static final long serialVersionUID = -2411978175041541798L;
	/**
	 * 产品序号
	 */
	
	@Column
	int number;
	/**
	 * 产品名称
	 */
	
	@Column
	String name;
	/**
	 * 物流公司
	 */

	@Column
	String company;
	/**
	 * one category of patient relate to Many patients objects
	 */
	@OneToMany(mappedBy = "supplierCategory", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<Supplier> supplier;
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
	
	
}
